﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class PrimeNumbers
{
    static bool IsPrime(int num)
    {
        if (num < 2) return false;
        for (int i = 2; i <= Math.Sqrt(num); i++)
            if (num % i == 0) return false;
        return true;
    }

    static void Main()
    {
        Console.Write("请输入下限和上限（用空格分隔）：");
        string[] input = Console.ReadLine().Split();
        int lower = int.Parse(input[0]);
        int upper = int.Parse(input[1]);

        int count = 0;
        for (int i = lower; i <= upper; i++)
        {
            if (IsPrime(i))
            {
                Console.Write($"{i}\t");
                if (++count % 10 == 0) Console.WriteLine();
            }
        }
        if (count % 10 != 0) Console.WriteLine();
    }
}